package com.wh.advice.model;

import lombok.Data;

@Data
public class Result<T> {

    private String s = "我是Result的s属性";
    private Integer num = 2008;
    private String errMsg;
    private T data;

    public static <T> Result success(T data) {
        Result result = new Result<>();
        result.setData(data);
        return result;
    }

    public static Result fail(String msg) {
        Result result = new Result();
        result.setErrMsg(msg);
        return result;
    }
}
